package com.carlton.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.carlton.common.Result;

import lombok.extern.slf4j.Slf4j;

@Service("SnowflakeApiService")
@Slf4j
public class SnowflakeApiService {

	@Autowired
	IDGen idGen;

	public Result getId(String key) {
		return idGen.get(key);
	}

	public List<Result> batchResult(Integer max) {
		return idGen.batchGet(max);
	}
}
